#!/bin/bash

mkdir /etc/yum.repos.d/CentOS.repos.backup
mv /etc/yum.repos.d/CentOS-* /etc/yum.repos.d/CentOS.repos.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache
yum repolist
yum update -y